<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">  
    <meta name = "format-detection" content = "telephone=no"> 
    <title>我的礼券</title>
    <link rel="stylesheet" href="/Public/Home/css/coupon.css?v=20170322002">
    <style>
        body{
            background: #fff;
        }
    </style>
    <!--不识别数字为手机-->
<meta name="format-detection" content="telephone=no, email=no"/>
<!--通用js-->
<?php if(isset($signPackage) && !empty($signPackage)){ ?>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js?v=201704270010"></script>
<?php } ?>
<script type="text/javascript" src="/Public/Home/js/require.js"></script>
<script type="text/javascript" src="/Public/Home/js/baseLoading.js?v=201705240001"></script>
<script src="/Public/Home/js/jquery.min.js" ></script>
<script src="/Public/Home/js/pincode-input.js" ></script>
<script src="/Public/Home/js/parabola.js" ></script>
<script src="/Public/Home/js/lazyload/jquery.lazyload.min.js"></script>
<script type="text/javascript">
    _global.isLogin = !!"<?php echo $wx_member_id; ?>";
	var isWxShareDiy = typeof yc_share_diy === "undefined" ? false : yc_share_diy;
	var yc_wx_shareImgPath = "";
	<?php if(isset($weixin_logo) && !empty($weixin_logo)){ ?>
		yc_wx_shareImgPath = "/Uploads/<?php echo ($weixin_logo["image"]); ?>";
	<?php } ?>
    var yc_pass_arr = {'local_id':"<?php echo I('local_id',1);?>",'top_local_id':"<?php echo I('top_local_id',1);?>"};
	if(parseInt(yc_pass_arr["local_id"]) == 21){
		_global.isStopSell = true;
	}
    <?php if(isset($signPackage) && !empty($signPackage)){ ?>
        _global.isWeiXinLoad = true;
        var isEnableLocation = typeof yc_wx_location === "undefined" ? false : yc_wx_location;
        var yc_wx_options = {
            "enableLocation" : isEnableLocation,
            "refuseCallback" : function(){},
            "mapCallback" : function(){},
            "config" : {
                debug: false,
                appId: '<?php echo $signPackage["appId"];?>',
                timestamp: '<?php echo $signPackage["timestamp"];?>',
                nonceStr: '<?php echo $signPackage["nonceStr"];?>',
                signature: '<?php echo $signPackage["signature"];?>',
                jsApiList: [
                    'checkJsApi'
                ]
            }
        };
        var isInHeader = typeof yc_wx_useInHeader === "undefined" ? true : yc_wx_useInHeader;
        if(isInHeader){
            wxAutoConfig(yc_wx_options);
        }
    <?php } ?>
</script>
</head>
<body>
    <div class="coupon-get">
        <input type="text" id="dhcode"  >
        <a href="javascript:void(0);">兑换</a>
    </div>
    <div class="coupon-box">
        <div class="coupon-des">
            <h4>有<label><?php echo ($count); ?></label>张礼券可使用</h4>
            <h4><a href="javascript:;">使用说明</a></h4>
        </div>
        <div id="ajax-couponlist" class="coupon-list"></div>
        <div class="progress-loader" style="display:none;">
            <?php if($count > 10 ): ?><a href="javascript:;" class="btn btn-second btn-block btn-coupon-more">加载更多&gt;&gt;</a><?php endif; ?>
        </div> 
    </div>
    <?php if($countfail > 0): ?><a href="<?php echo url('Member/memberCouponFail');?>" class="fail-coupon-btn">查看失效礼券&gt;&gt;</a><?php endif; ?>
    <script type="text/javascript">
		 function jump(url){
			window.location.href = url;
		}
		require(['member/coupon']);
	</script>
</body>
</html>